package com.atguigu.carousel.controller;

import com.atguigu.carousel.service.CarouselService;
import com.atguigu.pojo.Carousel;
import com.atguigu.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName:CarouselController
 * Package:com.atguigu.carousel.controller
 * Description:
 *
 * @Author 应永豪
 * @Create 2024/4/21 18:20
 * @Version 1.0
 */
@RestController
@RequestMapping("carousel")
public class CarouselController {
    @Autowired
    private CarouselService carouselService;

    //    查询轮播图，只要优先级最高的6条
    @PostMapping("list")
    public R list() {

        return carouselService.list();
    }
}
